#ifndef STANDARDTABLESECTIONMODEL_H
#define STANDARDTABLESECTIONMODEL_H

#include "abstract-section-model.h"

class StandardTableModel;

class StandardTableSectionModel : public AbstractSectionModel
{
    Q_OBJECT
public:
    explicit StandardTableSectionModel(QObject *parent = 0);

    QVariant id (int row, int column) const;
    QMap<int,QAbstractItemDelegate*> delegates() const;
    QList<bool> permissions() const;

    int rowCount (const QModelIndex& parent = QModelIndex()) const;
    int columnCount (const QModelIndex& parent = QModelIndex()) const;
    QVariant data (const QModelIndex &index, int role = Qt::DisplayRole) const;
    QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
    bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
    bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role = Qt::EditRole);
    bool insertRows (int row, int count, const QModelIndex &parent = QModelIndex());
    bool removeRows (int row, int count, const QModelIndex &parent = QModelIndex());

protected:
    StandardTableModel* m_internalModel;
    QMap<int,QAbstractItemDelegate*> m_delegates;
    int m_idColumnCount;
};

#endif // STANDARDTABLESECTIONMODEL_H
